<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DGRv2: model/dgr-sink.h Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">DGRv2<span id="projectnumber">&#160;2-dev</span>
   </div>
   <div id="projectbrief">A Delay-Guaranteed Routing Protocol model in ns-3</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('df/d56/dgr-sink_8h_source.html','../../'); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">dgr-sink.h</div></div>
</div><!--header-->
<div class="contents">
<a href="../../df/d56/dgr-sink_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/* -*- Mode:C++; c-file-style:&quot;gnu&quot;; indent-tabs-mode:nil; -*- */</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span> </div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="preprocessor">#ifndef DGR_PACKET_SINK_H</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="preprocessor">#define DGR_PACKET_SINK_H</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="preprocessor">#include &quot;ns3/application.h&quot;</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#include &quot;ns3/network-module.h&quot;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#include &quot;ns3/event-id.h&quot;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &quot;ns3/ptr.h&quot;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &quot;ns3/traced-callback.h&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &quot;ns3/address.h&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &quot;ns3/inet-socket-address.h&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &quot;ns3/seq-ts-size-header.h&quot;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#include &lt;unordered_map&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d7/d2e/namespacens3.html">ns3</a> {</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="keyword">class </span>Address;</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="keyword">class </span>Socket;</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="keyword">class </span>Packet;</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html">   54</a></span><span class="keyword">class </span><a class="code hl_class" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html">DGRPacketSink</a> : <span class="keyword">public</span> <a class="code hl_class" href="../../de/d6b/class_application.html">Application</a> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>{</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>  <span class="keyword">static</span> TypeId <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a558f3df30ebf65ef9ce9d22106fbd8bc">GetTypeId</a> (<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>  <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a3aecd00e57b3a656096239773f304c9f">DGRPacketSink</a> ();</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>  <span class="keyword">virtual</span> <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a605c00d50c8640e3dfbbdc517771aec6">~DGRPacketSink</a> ();</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>  uint64_t <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a69231f2139fbdd7948cff8c9edccdca4">GetTotalRx</a> () <span class="keyword">const</span>;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>  Ptr&lt;Socket&gt; <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#ac98581dc7987443224fd7237a12eb006">GetListeningSocket</a> (<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span>  Time <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a01e725bd9c630ab59e304d7ed5acf8d4">GetDelay</a>(<span class="keyword">const</span> Ptr&lt;Packet&gt; &amp;p) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span>  std::list&lt;Ptr&lt;Socket&gt; &gt; <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a2a9115096ef93e8b69846aaca86973f6">GetAcceptedSockets</a> (<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span> </div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#aaaeda043e3212ff79237c9eb7f7afa6d">   95</a></span>  <span class="keyword">typedef</span> void (* <a class="code hl_typedef" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#aaaeda043e3212ff79237c9eb7f7afa6d">SeqTsSizeCallback</a>)(Ptr&lt;const Packet&gt; p, <span class="keyword">const</span> Address &amp;from, <span class="keyword">const</span> Address &amp; to,</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>                                   <span class="keyword">const</span> SeqTsSizeHeader &amp;header);</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span> </div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span><span class="keyword">protected</span>:</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#adf51db7e24937d3c73a6669de841d61f">DoDispose</a> (<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span><span class="keyword">private</span>:</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>  <span class="comment">// inherited from Application base class.</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#abe7e96a9e41ed5e769ffc06a20cc775f">StartApplication</a> (<span class="keywordtype">void</span>);    <span class="comment">// Called at time specified by Start</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#aeb7f67c80886d5d2f24c23878f632508">StopApplication</a> (<span class="keywordtype">void</span>);     <span class="comment">// Called at time specified by Stop</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a5bc1c04b2b572ae2197853efeceb650e">HandleRead</a> (Ptr&lt;Socket&gt; socket);</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a60bdb8ea5bb655c1b77220963b2531d7">HandleAccept</a> (Ptr&lt;Socket&gt; socket, <span class="keyword">const</span> Address&amp; from);</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a4cdd5cf57dd8475e5d6656bf877dc220">HandlePeerClose</a> (Ptr&lt;Socket&gt; socket);</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#ae1f5b327422a264e50a57a45010c5b95">HandlePeerError</a> (Ptr&lt;Socket&gt; socket);</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span> </div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>  <span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#ac45b59904bfc3ab8c3beeafa3b66abfb">PacketReceived</a> (<span class="keyword">const</span> Ptr&lt;Packet&gt; &amp;p, <span class="keyword">const</span> Address &amp;from, <span class="keyword">const</span> Address &amp;localAddress);</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span> </div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"><a class="line" href="../../dc/db3/structns3_1_1_d_g_r_packet_sink_1_1_address_hash.html">  141</a></span>  <span class="keyword">struct </span><a class="code hl_struct" href="../../dc/db3/structns3_1_1_d_g_r_packet_sink_1_1_address_hash.html">AddressHash</a></div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>  {</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"><a class="line" href="../../dc/db3/structns3_1_1_d_g_r_packet_sink_1_1_address_hash.html#ab49962edbc018cae757cedf91d7a87c3">  153</a></span>    <span class="keywordtype">size_t</span> <a class="code hl_function" href="../../dc/db3/structns3_1_1_d_g_r_packet_sink_1_1_address_hash.html#ab49962edbc018cae757cedf91d7a87c3">operator() </a>(<span class="keyword">const</span> Address &amp;x)<span class="keyword"> const</span></div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span>      NS_ABORT_IF (!InetSocketAddress::IsMatchingType (x));</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span>      InetSocketAddress a = InetSocketAddress::ConvertFrom (x);</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span>      <span class="keywordflow">return</span> std::hash&lt;uint32_t&gt;()(a.GetIpv4 ().Get ());</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span>    }</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>  };</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span> </div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a50309ac35d6ee3c3bf8ed1aac032b18c">  161</a></span>  std::unordered_map&lt;Address, Ptr&lt;Packet&gt;, <a class="code hl_struct" href="../../dc/db3/structns3_1_1_d_g_r_packet_sink_1_1_address_hash.html">AddressHash</a>&gt; <a class="code hl_variable" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a50309ac35d6ee3c3bf8ed1aac032b18c">m_buffer</a>; </div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>  <span class="comment">// In the case of TCP, each socket accept returns a new socket, so the</span></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span>  <span class="comment">// listening socket is stored separately from the accepted sockets</span></div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a253617e51eb9048d70dca28e2cb2806b">  165</a></span>  Ptr&lt;Socket&gt;     <a class="code hl_variable" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a253617e51eb9048d70dca28e2cb2806b">m_socket</a>;       </div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a1d21d3eae077fdf088eda04bf2652d97">  166</a></span>  std::list&lt;Ptr&lt;Socket&gt; &gt; <a class="code hl_variable" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a1d21d3eae077fdf088eda04bf2652d97">m_socketList</a>; </div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span> </div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a7f9d4d540e2faa7004c3047913a29f09">  168</a></span>  Address         <a class="code hl_variable" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a7f9d4d540e2faa7004c3047913a29f09">m_local</a>;        </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#aa1eed0d34ee99dbaea2af47a795b70ca">  169</a></span>  uint64_t        <a class="code hl_variable" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#aa1eed0d34ee99dbaea2af47a795b70ca">m_totalRx</a>;      </div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a5df24d6eacd919ec2f0f944d520cb535">  170</a></span>  TypeId          <a class="code hl_variable" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a5df24d6eacd919ec2f0f944d520cb535">m_tid</a>;          </div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a2c42e5892ce165db37a2bd47436e4fb8">  172</a></span>  Ptr&lt;OutputStreamWrapper&gt; <a class="code hl_variable" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a2c42e5892ce165db37a2bd47436e4fb8">m_delayStream</a> = Create&lt;OutputStreamWrapper&gt;</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span>  (<span class="stringliteral">&quot;dgr-packet.delay&quot;</span>, std::ios::out);</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span> </div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#ac803f6a1d59503d2a5914f3c9a7f33ec">  175</a></span>  <span class="keywordtype">bool</span>            <a class="code hl_variable" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#ac803f6a1d59503d2a5914f3c9a7f33ec">m_enableSeqTsSizeHeader</a> {<span class="keyword">false</span>}; </div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span> </div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#aca03544d5c0deea1c5f900d89037e8ed">  178</a></span>  TracedCallback&lt;Ptr&lt;const Packet&gt;, <span class="keyword">const</span> Address &amp;&gt; <a class="code hl_variable" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#aca03544d5c0deea1c5f900d89037e8ed">m_rxTrace</a>;</div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a79fa3105c5e8709d6d2619a7665ce751">  180</a></span>  TracedCallback&lt;Ptr&lt;const Packet&gt;, <span class="keyword">const</span> Address &amp;, <span class="keyword">const</span> Address &amp;&gt; <a class="code hl_variable" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a79fa3105c5e8709d6d2619a7665ce751">m_rxTraceWithAddresses</a>;</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"><a class="line" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a2d3c05d2d32ce064ce1ad0b46564bcfb">  182</a></span>  TracedCallback&lt;Ptr&lt;const Packet&gt;, <span class="keyword">const</span> Address &amp;, <span class="keyword">const</span> Address &amp;, <span class="keyword">const</span> SeqTsSizeHeader&amp;&gt; <a class="code hl_variable" href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a2d3c05d2d32ce064ce1ad0b46564bcfb">m_rxTraceWithSeqTsSize</a>;</div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span>};</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span> </div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span>} <span class="comment">// namespace ns3</span></div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span> </div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span><span class="preprocessor">#endif </span><span class="comment">/* DGR_PACKET_SINK_H */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span> </div>
<div class="ttc" id="aclass_application_html"><div class="ttname"><a href="../../de/d6b/class_application.html">Application</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html">ns3::DGRPacketSink</a></div><div class="ttdoc">Receive and consume traffic generated to an IP address and port.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00054">dgr-sink.h:55</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a01e725bd9c630ab59e304d7ed5acf8d4"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a01e725bd9c630ab59e304d7ed5acf8d4">ns3::DGRPacketSink::GetDelay</a></div><div class="ttdeci">Time GetDelay(const Ptr&lt; Packet &gt; &amp;p) const</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00095">dgr-sink.cc:95</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a1d21d3eae077fdf088eda04bf2652d97"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a1d21d3eae077fdf088eda04bf2652d97">ns3::DGRPacketSink::m_socketList</a></div><div class="ttdeci">std::list&lt; Ptr&lt; Socket &gt; &gt; m_socketList</div><div class="ttdoc">the accepted sockets</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00166">dgr-sink.h:166</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a253617e51eb9048d70dca28e2cb2806b"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a253617e51eb9048d70dca28e2cb2806b">ns3::DGRPacketSink::m_socket</a></div><div class="ttdeci">Ptr&lt; Socket &gt; m_socket</div><div class="ttdoc">Listening socket.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00165">dgr-sink.h:165</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a2a9115096ef93e8b69846aaca86973f6"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a2a9115096ef93e8b69846aaca86973f6">ns3::DGRPacketSink::GetAcceptedSockets</a></div><div class="ttdeci">std::list&lt; Ptr&lt; Socket &gt; &gt; GetAcceptedSockets(void) const</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00089">dgr-sink.cc:89</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a2c42e5892ce165db37a2bd47436e4fb8"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a2c42e5892ce165db37a2bd47436e4fb8">ns3::DGRPacketSink::m_delayStream</a></div><div class="ttdeci">Ptr&lt; OutputStreamWrapper &gt; m_delayStream</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00172">dgr-sink.h:172</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a2d3c05d2d32ce064ce1ad0b46564bcfb"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a2d3c05d2d32ce064ce1ad0b46564bcfb">ns3::DGRPacketSink::m_rxTraceWithSeqTsSize</a></div><div class="ttdeci">TracedCallback&lt; Ptr&lt; const Packet &gt;, const Address &amp;, const Address &amp;, const SeqTsSizeHeader &amp; &gt; m_rxTraceWithSeqTsSize</div><div class="ttdoc">Callbacks for tracing the packet Rx events, includes source, destination addresses,...</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00182">dgr-sink.h:182</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a3aecd00e57b3a656096239773f304c9f"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a3aecd00e57b3a656096239773f304c9f">ns3::DGRPacketSink::DGRPacketSink</a></div><div class="ttdeci">DGRPacketSink()</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00063">dgr-sink.cc:63</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a4cdd5cf57dd8475e5d6656bf877dc220"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a4cdd5cf57dd8475e5d6656bf877dc220">ns3::DGRPacketSink::HandlePeerClose</a></div><div class="ttdeci">void HandlePeerClose(Ptr&lt; Socket &gt; socket)</div><div class="ttdoc">Handle an connection close.</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00283">dgr-sink.cc:283</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a50309ac35d6ee3c3bf8ed1aac032b18c"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a50309ac35d6ee3c3bf8ed1aac032b18c">ns3::DGRPacketSink::m_buffer</a></div><div class="ttdeci">std::unordered_map&lt; Address, Ptr&lt; Packet &gt;, AddressHash &gt; m_buffer</div><div class="ttdoc">Buffer for received packets.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00161">dgr-sink.h:161</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a558f3df30ebf65ef9ce9d22106fbd8bc"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a558f3df30ebf65ef9ce9d22106fbd8bc">ns3::DGRPacketSink::GetTypeId</a></div><div class="ttdeci">static TypeId GetTypeId(void)</div><div class="ttdoc">Get the type ID.</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00027">dgr-sink.cc:27</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a5bc1c04b2b572ae2197853efeceb650e"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a5bc1c04b2b572ae2197853efeceb650e">ns3::DGRPacketSink::HandleRead</a></div><div class="ttdeci">void HandleRead(Ptr&lt; Socket &gt; socket)</div><div class="ttdoc">Handle a packet received by the application.</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00170">dgr-sink.cc:170</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a5df24d6eacd919ec2f0f944d520cb535"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a5df24d6eacd919ec2f0f944d520cb535">ns3::DGRPacketSink::m_tid</a></div><div class="ttdeci">TypeId m_tid</div><div class="ttdoc">Protocol TypeId.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00170">dgr-sink.h:170</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a605c00d50c8640e3dfbbdc517771aec6"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a605c00d50c8640e3dfbbdc517771aec6">ns3::DGRPacketSink::~DGRPacketSink</a></div><div class="ttdeci">virtual ~DGRPacketSink()</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00070">dgr-sink.cc:70</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a60bdb8ea5bb655c1b77220963b2531d7"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a60bdb8ea5bb655c1b77220963b2531d7">ns3::DGRPacketSink::HandleAccept</a></div><div class="ttdeci">void HandleAccept(Ptr&lt; Socket &gt; socket, const Address &amp;from)</div><div class="ttdoc">Handle an incoming connection.</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00293">dgr-sink.cc:293</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a69231f2139fbdd7948cff8c9edccdca4"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a69231f2139fbdd7948cff8c9edccdca4">ns3::DGRPacketSink::GetTotalRx</a></div><div class="ttdeci">uint64_t GetTotalRx() const</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00075">dgr-sink.cc:75</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a79fa3105c5e8709d6d2619a7665ce751"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a79fa3105c5e8709d6d2619a7665ce751">ns3::DGRPacketSink::m_rxTraceWithAddresses</a></div><div class="ttdeci">TracedCallback&lt; Ptr&lt; const Packet &gt;, const Address &amp;, const Address &amp; &gt; m_rxTraceWithAddresses</div><div class="ttdoc">Callback for tracing the packet Rx events, includes source and destination addresses.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00180">dgr-sink.h:180</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_a7f9d4d540e2faa7004c3047913a29f09"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#a7f9d4d540e2faa7004c3047913a29f09">ns3::DGRPacketSink::m_local</a></div><div class="ttdeci">Address m_local</div><div class="ttdoc">Local address to bind to.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00168">dgr-sink.h:168</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_aa1eed0d34ee99dbaea2af47a795b70ca"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#aa1eed0d34ee99dbaea2af47a795b70ca">ns3::DGRPacketSink::m_totalRx</a></div><div class="ttdeci">uint64_t m_totalRx</div><div class="ttdoc">Total bytes received.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00169">dgr-sink.h:169</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_aaaeda043e3212ff79237c9eb7f7afa6d"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#aaaeda043e3212ff79237c9eb7f7afa6d">ns3::DGRPacketSink::SeqTsSizeCallback</a></div><div class="ttdeci">void(* SeqTsSizeCallback)(Ptr&lt; const Packet &gt; p, const Address &amp;from, const Address &amp;to, const SeqTsSizeHeader &amp;header)</div><div class="ttdoc">TracedCallback signature for a reception with addresses and SeqTsSizeHeader.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00095">dgr-sink.h:95</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_abe7e96a9e41ed5e769ffc06a20cc775f"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#abe7e96a9e41ed5e769ffc06a20cc775f">ns3::DGRPacketSink::StartApplication</a></div><div class="ttdeci">virtual void StartApplication(void)</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00116">dgr-sink.cc:116</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_ac45b59904bfc3ab8c3beeafa3b66abfb"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#ac45b59904bfc3ab8c3beeafa3b66abfb">ns3::DGRPacketSink::PacketReceived</a></div><div class="ttdeci">void PacketReceived(const Ptr&lt; Packet &gt; &amp;p, const Address &amp;from, const Address &amp;localAddress)</div><div class="ttdoc">Packet received: assemble byte stream to extract SeqTsSizeHeader.</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00244">dgr-sink.cc:244</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_ac803f6a1d59503d2a5914f3c9a7f33ec"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#ac803f6a1d59503d2a5914f3c9a7f33ec">ns3::DGRPacketSink::m_enableSeqTsSizeHeader</a></div><div class="ttdeci">bool m_enableSeqTsSizeHeader</div><div class="ttdoc">Enable or disable the export of SeqTsSize header.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00175">dgr-sink.h:175</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_ac98581dc7987443224fd7237a12eb006"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#ac98581dc7987443224fd7237a12eb006">ns3::DGRPacketSink::GetListeningSocket</a></div><div class="ttdeci">Ptr&lt; Socket &gt; GetListeningSocket(void) const</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00082">dgr-sink.cc:82</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_aca03544d5c0deea1c5f900d89037e8ed"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#aca03544d5c0deea1c5f900d89037e8ed">ns3::DGRPacketSink::m_rxTrace</a></div><div class="ttdeci">TracedCallback&lt; Ptr&lt; const Packet &gt;, const Address &amp; &gt; m_rxTrace</div><div class="ttdoc">Traced Callback: received packets, source address.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00178">dgr-sink.h:178</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_adf51db7e24937d3c73a6669de841d61f"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#adf51db7e24937d3c73a6669de841d61f">ns3::DGRPacketSink::DoDispose</a></div><div class="ttdeci">virtual void DoDispose(void)</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00105">dgr-sink.cc:105</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_ae1f5b327422a264e50a57a45010c5b95"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#ae1f5b327422a264e50a57a45010c5b95">ns3::DGRPacketSink::HandlePeerError</a></div><div class="ttdeci">void HandlePeerError(Ptr&lt; Socket &gt; socket)</div><div class="ttdoc">Handle an connection error.</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00288">dgr-sink.cc:288</a></div></div>
<div class="ttc" id="aclassns3_1_1_d_g_r_packet_sink_html_aeb7f67c80886d5d2f24c23878f632508"><div class="ttname"><a href="../../dc/d11/classns3_1_1_d_g_r_packet_sink.html#aeb7f67c80886d5d2f24c23878f632508">ns3::DGRPacketSink::StopApplication</a></div><div class="ttdeci">virtual void StopApplication(void)</div><div class="ttdef"><b>Definition</b> <a href="../../d3/d89/dgr-sink_8cc_source.html#l00153">dgr-sink.cc:153</a></div></div>
<div class="ttc" id="anamespacens3_html"><div class="ttname"><a href="../../d7/d2e/namespacens3.html">ns3</a></div><div class="ttdef"><b>Definition</b> <a href="../../d5/d65/dgr-application-helper_8cc_source.html#l00027">dgr-application-helper.cc:27</a></div></div>
<div class="ttc" id="astructns3_1_1_d_g_r_packet_sink_1_1_address_hash_html"><div class="ttname"><a href="../../dc/db3/structns3_1_1_d_g_r_packet_sink_1_1_address_hash.html">ns3::DGRPacketSink::AddressHash</a></div><div class="ttdoc">Hashing for the Address class.</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00141">dgr-sink.h:142</a></div></div>
<div class="ttc" id="astructns3_1_1_d_g_r_packet_sink_1_1_address_hash_html_ab49962edbc018cae757cedf91d7a87c3"><div class="ttname"><a href="../../dc/db3/structns3_1_1_d_g_r_packet_sink_1_1_address_hash.html#ab49962edbc018cae757cedf91d7a87c3">ns3::DGRPacketSink::AddressHash::operator()</a></div><div class="ttdeci">size_t operator()(const Address &amp;x) const</div><div class="ttdoc">operator ()</div><div class="ttdef"><b>Definition</b> <a href="../../df/d56/dgr-sink_8h_source.html#l00153">dgr-sink.h:153</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_3f14f6767c31cb4a1d22c13c18cc6fc3.html">model</a></li><li class="navelem"><a class="el" href="../../df/d56/dgr-sink_8h.html">dgr-sink.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7 </li>
  </ul>
</div>
</body>
</html>
